#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f;

void solve()
{
    string s;
    cin >> s;
    map<char, int> mp;
    for (auto& e : s) mp[e]++;
    auto it = mp.end();
    it--;
    for (int i = 0; i < it->second; i++) cout << it->first;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    // cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}